home *** CD-ROM | disk | FTP | other *** search
- /* FILE: PStr2Num.c
- Sets value of a given type of number based on a pascal string
- representation, returning TRUE if it fails to do so. */
- #include "PStrLib.h"
-
- PStr2Num(pStr, type, numPtr)
- char *pStr; /* points to a PASCAL string */
- int type; /* type of variable n points at */
- void *numPtr; /* generic pointer */
- {
- auto Decimal _decimal_;
- auto int valid, index = 1; /* start-scan pos. of pStr */
-
- Str2Dec(pStr, &index, &_decimal_, &valid);
- fp68k(&_decimal_, numPtr, type + FOD2B);
- return(!valid); /* returns TRUE if failed */
- }
-